package com.weichat.service;

import com.weichat.dto.CartDTO;
import com.weichat.entity.ProductInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 * Created By HZP
 * Date: 2018/6/6
 * Time: 22:29
 */
public interface ProductInfoService {
    public List<ProductInfo> findAll();

    public Page<ProductInfo> findAllPage(Pageable page);

    public ProductInfo save(ProductInfo productInfo);

    public List<ProductInfo> findUpAll();

    public ProductInfo findOne(String productId);

    //加库存
    void increaseStock(List<CartDTO> cartDTOLis);

     //减库存
    void decreaseStock(List<CartDTO> cartDTOS);
}

